package dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import pojo.PORTV;

public interface PORTVDao {

	@Select(value="select * from portv where essay_id=#{essayId} and user_id=#{userId}")
	@Results({ @Result(property="portId", column="port_id", id = true),
		@Result(property = "userId", column = "user_id"), 
		@Result(property = "essayId", column = "essay_id"),})
	public PORTV selectport(@Param("essayId")Integer essayId,@Param("userId") Integer userId);
	
	
	@Delete(value="delete from portv where essay_id=#{essayId}")
	public int DeleteAllEssay(Integer essayId);
}
